/*
 * Copyright (c) 2019 - 2020 IoT Company of Midea Group.
 *
 * File Name 	    : 
 * Description	    : rtos adaptor
 *
 * Version	        : v0.1
 * Author			: 
 * Date	            : 2019/09/15  refactoring
 * History	        : 
 */

#ifndef __MS_OSAL_H__
#define __MS_OSAL_H__

// #include <k_api.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <stdbool.h>

typedef enum
{
	MS_OSAL_RESULT_SUCCESS            = 0x00,
	MS_OSAL_RESULT_ERROR              = 0x01,
}ms_osal_result_t;

typedef void*  ms_osal_timer_t;

typedef int    ms_osal_timer_tick_t;

typedef unsigned long  ms_osal_timer_time_t;

typedef void*  ms_osal_mutex_t;

typedef void*  ms_osal_queue_t;

typedef void*  ms_osal_semaphore_t;

typedef void*  ms_osal_thread_t;

#define  MS_OSAL_WAIT_FOREVER   ((uint64_t)-1)

/**
 * \brief CLR_STRUCT(p) \n
 * 宏函数，清空结构体
 * \param p  结构体指针
 * \return 肯定执行成功.
 */
#define CLR_STRUCT(p) do {memset(p, 0x0, sizeof(*p));} while(0)

#endif // __MS_OSAL_H__

